package com.minjiang.blog.mapper;

import com.minjiang.blog.mode.Blog;
import com.minjiang.blog.queryvo.*;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
@Component
@SuppressWarnings("all")
public interface BlogDao {
//    ShowBlog getBlogById(Long id);

    List<Blog> getAllBlog();
    //查看博客管理列表
    List<BlogQuery> getAllBlogQuery();
//    搜索查看博客管理列表
    List<BlogQuery> getBlogBySearch(SearchBlog blog);
    //根据id查找博客
    Blog getBlogById(Long id);
    //保存博客
    int saveBlog(Blog blog);
    //修改博客
    int updateBlog(Blog blog);
    //删除博客
    int deleteBlog(Long id);
    //搜索博客
//    List<BlogQuery> searchByTitleOrTypeOrRecommend(SearchBlog searchBlog);
    //查看博客(姓名)
    Blog getBlogByName(@Param("title") String title);

}
